HTMLify
style.css
Views: 5 | Author: cody
body {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
overflow-x: hidden;
}
.container {
display: flex;
}
.l-container {
position: relative;
flex: 1;
background-color: #ffd4b8;
height: 100vh;
width: 100vw;
overflow: hidden;
transition: flex 0.5s ease-in-out;
}
.l-container::after {
content: "";
position: absolute;
background-image: url(./sad.png);
height: 100%;
width: 100%;
bottom: 0;
left: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.r-container {
position: relative;
flex: 1;
background-color: #cfffd0;
width: 100vw;
overflow: hidden;
transition: flex 0.5s ease-in-out;
}
.r-container::after {
content: "";
position: absolute;
background-image: url(./happy.png);
height: 100%;
width: 100%;
bottom: 0;
right: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.l-container.active {
flex: 2;
}
.r-container.active {
flex: 2;
}